export default(options)=>{
    return new Promise((resolve,reject)=>{
        $.ajax({
            type:options.method||"POST",
            url:options.url,
            data:options.data,
            headers:options.headers||{},
            success:function(data){
                resolve(data);
                console.log(data)
            },
            error:function(err){
                reject(err)
               
            }

        })
        
    })
}